
from base.myBase import Tools

class login_model(Tools):
    path = '/user/login'
    def login_action(self, usr, pwd, check='1234'):
        mydata = {
            "username": usr,
            "password": self.md5(text=pwd),
            "checkcode": check
        }
        res = self.huihua.post(url=self.hosturl+self.path, data=mydata)
        return res.json()
import requests
s = requests.session()
reg = login_model(huihua=s)
msg = reg.login_action(usr='adminhjhdka',pwd='admin12333',check='1234')
print(msg)
